<%--
  Created by IntelliJ IDEA.
  User: LENOVO
  Date: 2018/7/13
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>索赔报表柱状图</title>
    <!-- 引入 echarts.js -->
    <script src="/static/js/plugins/eCharts/echarts-all.js"></script>
</head>
<body>

<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '理赔报表',
            //subtext: "业务人员",
            subtext: '${groupClaimByTypes}',
            x:"center"
        },
        tooltip: {
            show: true
        },
        legend: {
            data: ['理赔额'],
            x:"left"
        },
        xAxis: {
            //data: ["张三","李四","刘一坚","张祥伟","陈文龙"]
            data: ${groupByType}
        },
        yAxis: {},
        /*工具箱*/
        toolbox: {
            x: 'right',
            show: true,
            feature: {
                /*辅助线开关*/
                mark: {show: true},
                /*数据视图*/
                dataView: {show: true, readOnly: false},
                /*图标类型切换*/
                magicType: {show: true, type: ['line', 'bar']},
                /*还原视图*/
                restore: {show: true},
                /*保存为图片*/
                saveAsImage: {show: true}
            }
        },
        series: [{
            name: '理赔额',
            type: 'bar',
           // data: [5, 20, 36, 10, 10, 20]
            data: ${totalAmount}

        }]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>

</body>
</html>
